﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Frame.Lib.Data;

namespace Cms.Entity.FreindLink
{
    public partial class FreindLinkInfo : EntityBase
    {
        public override string GetTableName()
        {
            return "c_FreindLink";
        }
        public override string GetInsertSql()
        {
            return "insert into c_FreindLink ( [ID], [Name], [ImagePath], [Url]) values ( @ID, @Name, @ImagePath, @Url)";
        }
        public override string GetUpdateSql()
        {
            return "update c_FreindLink set  [Name] = @Name, [ImagePath] = @ImagePath, [Url] = @Url where ID = @ID";
        }
        /// <summary>
        /// 
        /// </summary>
        public Int32 ID
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        public String Name
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        public String ImagePath
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        public String Url
        {
            get;
            set;
        }
        public override void SetValue(string key, object value)
        {
            key = key.ToLower();
            switch (key)
            {
                case "id":
                    this.ID = (Int32)value;
                    break;
                case "name":
                    this.Name = (String)value;
                    break;
                case "imagepath":
                    this.ImagePath = (String)value;
                    break;
                case "url":
                    this.Url = (String)value;
                    break;
            }
        }
        public override object GetValue(string key)
        {
            key = key.ToLower();
            switch (key)
            {
                case "id":
                    return this.ID;
                case "name":
                    return this.Name;
                case "imagepath":
                    return this.ImagePath;
                case "url":
                    return this.Url;
                default:
                    return null;
            }
        }
    }

}
